package com.zmzncs.lmtc.module.customer.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zmzncs.lmtc.module.customer.pojo.card_park.CardPark;
import com.zmzncs.lmtc.module.customer.dao.CardParkDao;
import com.zmzncs.lmtc.module.customer.pojo.card_park.CardParkDTO;
import com.zmzncs.lmtc.module.customer.service.CardParkService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * <p>
 * 客户-会员卡关联的停车场 服务实现类
 * </p>
 *
 * @author 任建波
 * @since 2020-09-03
 */
@Service
public class CardParkServiceImpl extends ServiceImpl<CardParkDao, CardPark> implements CardParkService {

    @Autowired
    CardParkDao cardParkDao;

    /**
     * 获取车辆服务实时状态关联的停车场
     */
    @Override
    public IPage<CardParkDTO> getCardParkList(Integer currentPage, Integer pageSize, Integer cardId, String keyword) {
        IPage<CardParkDTO> cardParkPage = cardParkDao.getCardParkList(new Page(currentPage, pageSize), cardId, keyword);
        return cardParkPage;
    }

}
